home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / CIncludesTool / ¡¡¡ Read Me !!!
Text File  |  1994-02-27  |  4KB  |  80 lines

  1. Read-Me file for CIncludes tools and scripts.
  2.  
  3. This archive contains some MPW and ToolServer scripts and tools that are useful
  4. for finding C function definitions, etc. in your standard header files.
  5.  
  6. Two versions are included. The original was obtained from CompuServe a number
  7. of years ago. It was very useful, but had some limitations (no provision for
  8. switching from the header files and definitions  for one compiler to another,
  9. the include files were expected to all be in a single folder, etc.)
  10.  
  11. I modified the original tool (slightly) and script (much more extensively) to
  12. deal with these issues. There is an environment variable defined {CIncludesCompiler}
  13. which defines which compiler is currently in use, and therefore what search path
  14. should be used when locating header files. The included scripts have support for
  15. the Apple C and C++ compilers, the Symantec MPW compilers, and the Metrowerks CodeWarrior
  16. compilers. The first two come with a standard set of scripts which define environment
  17. variables for normal and MacApp header files. These same environment variables are used
  18. by my scripts. Since the Metrowerks compilers aren't MPW tools, they don't come with any
  19. scripts. I have supplied two scripts (UserStartup•MW and UserStartupTS•MW) to define
  20. comparable environment variables. These scripts should be edited to reflect the correct
  21. file path to the headers on your drive.
  22.  
  23. Please read the file "Instructions" which accompanies the original version of the
  24. scripts and tool for information on what services are provided. The following notes
  25. are not intended to be exhaustive or complete.
  26.  
  27. Included are scripts for using the CIncludesCode tool with BBEdit, ObjectMaster, and
  28. Metrowerks CodeWarrior. These editors use different commands to support opening files
  29. from within ToolServer, so the supporting scripts have been modified appropriately.
  30. In the MPW shell, the main script is named CIncludesTool. In BBEdit it's called
  31. BBEdit•CIncludesTool. For ObjectMaster, it's OMCincludesTool. For CodeWarrior, it's
  32. MWCIncludesTool.
  33.  
  34. After installing the scripts and tools (making any modifications to search paths, etc.
  35. required by your system), the first step is to generate the data files (1 per compiler)
  36. used by the tools and scripts. In MPW the command:
  37.  
  38. CIncludesTool -m
  39.  
  40. will generate the file (which can be very time consuming). Note that if this is performed
  41. using ToolServer (in ObjectMaster, BBEdit, Metrowerks, etc.) there is very little feedback
  42. about the status of the operation. Be patient: it takes a long time to parse 100+ header
  43. files. The data file is automatically put in the preferences folder within the system folder.
  44.  
  45. Once the data file has been made, the other 3 functions can be tried. The commands are:
  46.  
  47. CIncludesTool -i
  48.     when this is invoked via menu, with selected #include <headername.h> text,
  49.     the selected #includes are reformatted to remove redundancies
  50.     
  51. CIncludesTool -f
  52.     when this is invoked via menu, with selected text, a line of the form:
  53.  #include <headername.h>
  54.      is added to the file's current list of #includes, where headername.h is the
  55.      file which contains the definition of the selected text. Note that the command
  56.      doesn't check for duplicates, so <headername.h> may already be present
  57.     
  58. CIncludesTool -d
  59.     when this is invoked via menu, with selected text, the header file containing
  60.     the definition of the selected text is opened, with the definition selected.
  61.      
  62. The MPW Shell supports all 3 operations, as it has a flexible, scriptable Find command.
  63. Under BBEdit, ObjectMaster, and Metrowerks, only the last two are available. Also,
  64. rather than adding the  #include <headername.h> for the CIncludesTool -f command
  65. (which can't easily be done owing to limited scripting ability), either an alert with the
  66. name of the header file is displayed, or the #include <headername.h> is written to the
  67. worksheet. Also, only ObjectMaster supports getting the current selection, so the BBEdit
  68. and Metrowerks scripts have been modified to take an extra parameter (the definition to
  69. be searched for).
  70.  
  71. ••••••••••••••••••••••••••
  72.  
  73. IMPORTANT. The source code and scripts are copyrighted by the original author, who released
  74. them for non-profit use by individuals. I attach no additional restrictions to my
  75. modifications, and I accept no responsibility or liability for your use of any of the
  76. enclosed files.
  77.  
  78. Brian Clark
  79. b-clark@nwu.edu
  80.